added exception handling for log file opening
pip files