Fix error when no file is sent