removed the swp file and cleaned up the error function