fixed file type error, fixed custome file name missing extension error