Prevent loading wrong file type