lib: added a few error checks, and exceptions, to a_osloader.c file handling