Reworked the entire filestructure and tried to get the error checking to work.