Improve logging and refactor allocate action code a bit (OMS-339)