This adds some documentation to the mmap functions and also improves the logging by bumping errors to LOG_ERROR.