security of design for sending files let's say I have a protocol to send a file $F$. I am intending to employ AES in CBC mode for encrypting $F$ where the $IV$ is
randomly chosen. For authenticity, I am employing $HMAC$ to compute
a Message Authentication Code ($MAC$). Both the encrypted version of $F$ and the $MAC$ are sent to the receiver. 

Is there any flaw in this design?
So here's what you're doing:
$$E_{K_1,IV}(F)||H_{K_2}(F)$$

where E denotes encryption with AES-CBC and H denotes HMAC. This is also known as "Encrypt and MAC".

This scheme potentially has a few issues.


It's (formally) not IND-CPA secure, because an attacker can query the encryption oracle for the challenge ciphertexts and compare the resulting MACs.
The scheme puts higher-than-normal contraints on the MAC, because normally MACs aren't assumed to guarantee not to leak anything about their inputs. With HMAC this isn't a problem though.
The scheme could potentially be vulnerable to POODLE-style attacks if you don't validate your CBC padding properly.




As a secure alternative I highly recommend using AES-GCM if you encrypt less than a few GB per key or AES-EAX if you do. Preferably use some well-known and reviewed implmentation of them because getting AES-GCM right isn't exactly easy. As EAX and GCM are authenticated encryption modes they only expect a unique IV from you and the key and will encrypt and authenticate the message properly.