add save_errors and save_actions functions
add new open flag FO_APEXTR and fix _fo_ap
add flag FO_APEXTR and fix append
add flag FO_APEXTR and fix functions to open files in append mode