Add Regular Expressions to validate the path.
Fix error log message.