Can work also if replace file does not exist