Moved the improper max size error message to stderr and made it return exit code 1.
Added check for max_cache_size from config file.
Added checks for max cache sizes that are not greater than zero.