This function returns am_status_twith one of the following values:
If the logging file could be set
If unable to allocate memory for internal data structures
If any other error is detected