more debug output, error handling, bug fix #5, fixed debug output (-.-
omg.. im so dumb)