fix for write_file (dos2unix), moved error handling into vop_shell