Avoid crashing the server if the format configuration is missing and improved the logged messages.
Fixed JavaScript code warnings (e.g. unused variables, missing semicolons).