added check for .bash_source file and wrapped reading the log file into On Error Resume Next