fixed changing the file type to anything other than png