added a trim to media directory value