moved out set current file from cloudfunc to client.js