fixed file type validation, added size validation