A part of my script prints success and error messages on a text file, but I am not getting any errors.