Meaningful error codes instead of plain -1
handleFatalError() moved to error.hpp