Improved the sound file handeling and added a debug mode.