Trying to add error handling NOT WORKING WELL lol