Log files to discover errors
Fixed an issue with validation