Added print outs to stderr for debugging