Edited based on testing

Added some debugging output. Extended timeout. Corrected scaling.