Removed depreciated file and updated the error function