when an error occurs add the path of the file which caused the error