added user and error handling and data.txt to store data