handle invalid fileid better