Formatting and better error reporting for railtie