Common file operations for golang