Better check on input file type

Only pictures are allowed