Added RakLib error logging and crash handling