Added ability to specify file type manually