Fixed non closed file issue when dealing with not yet synced source file for upload.

Signed-off-by: Daniel (dmilith) Dettlaff <dmilith@verknowsys.com>