Create log function with timestamp
Move curl functions to separate file