Corrected file transfer
+ Some bug fixes in file handling