1. Fixed regex error
2. Updated error messages
3. Fixed bug in log and error file rendering code