fixing file copy from tmp dir