Problem #1: Let me see if I'm understanding this right...on the rear light function button you somehow changed the "on/off" to a sound file? I'm not sure how that can happen because the files that shows up in the list of possible ones depends on what type of function button you select. See below (this is an old revision so the buttons are in a different spot, but the names are the same):
If you tell the rear light button to be a "sound" button (button type) then only sound files will show up when you tap on the "name" field. If you tell the rear light button to be a "light" type button, then only light files will show up in the "name" list. The "on/off" file is what you need for the front and rear headlights. It is installed on every locomotive module. It can't be written over, but it can be deleted. However, the only way to delete it would be to purposefully delete manually. I don't think you did that.
Make sure the button type is "light" and not "sound". Once it is selected as "light" you will find the "on/off" file found under the "name" list.
-Kevin