Added better file-type validation