Automatically adding file extension