Added a return if canUpload is set to false, so that the function will s...

...top running.