Added loging to Text File for better error report