merged file error handling from RC_0_16