Attempt to improve code

Replace fake "errors" with actual errors.
Use a global list for non-critical warning messages.