Just cleaned things up a bit. Eliminated unnecessary slave_ldA variable.
Added code to end program safely if file open fails